﻿var status = 0;




function start() {
    status = -1;
    action(1, 0, 0);
}

function action(mode, type, selection) {

    if (mode == -1) {
        cm.dispose();
    } else {
        if (mode == 0) {
            cm.dispose();
            return;
        }
        if (mode == 1)                           						
            status++;
        else
            status--;
                if (status == 0) {
				cm.EnableUI(1);
				cm.DisableUI(true);
				cm.sendDirectionFacialExpression(25, 1000)
				//cm.getDirectionInfo(1, 1000);
				cm.sendNextS("出來修怕00",3);
            } else if (status == 1) {
				cm.sendDirectionFacialExpression(26, 1000)
                cm.getDirectionInfo("Effect/DirectionJP3.img/effect/kannaTuto/balloonMsg/4", 0, 0, -120, 0, 0);
                cm.getDirectionInfo(1, 1000);
				cm.spawnNPCRequestController(9131007, 400, -14);
                cm.setNPCSpecialAction(9131007, "summon");
            }  else if (status == 2) {
				cm.sendDirectionFacialExpression(27, 1000)
				cm.getDirectionInfo(1, 1000);
            }/*else if (status == 3) {
				cm.getDirectionInfo(3, 6);
				cm.getDirectionInfo(1, 1000);
            }*/else {
				cm.getDirectionInfo(3, 0);
                cm.EnableUI(0);

                cm.dispose();

             
            }
     
}
}